﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Templates_SystemsFlash_Default" %>


<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

<acms:JavascriptFile ID="jquery" Path="~/Scripts/swfobject.js" runat="server" />
<style type="text/css"></style>


<script type="text/javascript">
    var jsReady = false;

    function isReady() {
        return jsReady;
    }

    function pageInit() {
        jsReady = true;
        //alert("js ready");
        //document.forms["form1"].output.value += "\n" + "JavaScript is readyy.\n";
    }

    function thisMovie(movieName) {
        if (window.document[movieName]) {
            return window.document[movieName];
        }
        if (navigator.appName.indexOf("Microsoft Internet") == -1) {
            if (document.embeds && document.embeds[movieName])
                return document.embeds[movieName];
        }
        else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
        {
            return document.getElementById(movieName);
        }
    }
    
    function sendToActionScriptA(pos) {
    
        thisMovie("Systems").sendToActionScript(pos);
    }

    function sendToJavaScript(value) {
        //alert(value);
        showItem(value);
        //document.forms["form1"].output.value += "ActionScript says: " + value + "\n";
    }
    // execute your scripts when the DOM is ready. this is mostly a good habit

    $(function() {
        pageInit();

        //
//        $(".hotSpot").tooltip({
//            position: 'bottom left',
//            //position: 'bottom right',
//            relative: true,
//            offset: [-60, 10],
//            effect: 'slide'
//        });

        $(".hotSpot").each(function() {
            var hotspot = parseInt($(this).css('top'), 10);
            if (hotspot > 150) {
                alert("yes");
                
                $(this).tooltip({
                position: 'top right',
                //position: 'bottom right',
                relative: true,
                offset: [95, 10],
                effect: 'slide'
                })

            }else { 
                $(this).tooltip({
                    position: 'bottom right',
                    //position: 'bottom right',
                    relative: true,
                    offset: [-60, 10],
                    effect: 'slide'
                })
            }
        })

        $("a.navApplication").bind("click", function() {
            pos = $(this).parent().index();
            $(".items .active").fadeOut('fast', function() { sendToActionScriptA(pos) }).removeClass("active");

            $("a.navApplication").parent().removeClass("active");
            $(this).parent().addClass("active");

            return false
        });

        //test start
        $("a#Test").bind("click", function() {
            alert("start");
            $("#TestBlock").fadeOut('fast', function() { alert("now"); });
            return false
        });
        //test end
    });

    function showItem(itemNo) {
        $('.items .item:eq(' + itemNo + ')').fadeIn('fast').addClass("active");
    }
</script>

<!--SWF OBJECT-->
<script type="text/javascript">
    var flashvars = {};
    var params = {
        menu: "false",
        scale: "noScale",
        allowFullscreen: "true",
        allowScriptAccess: "always",
        bgcolor: "#FFFFFF",
        wmode:"transparent"
    };
    var attributes = {
        id: "Systems"
    };
    swfobject.embedSWF("http://localhost/Schiebel/Flash/Systems.swf", "Systems", "100%", "100%", "9.0.0", "../../Flash/expressInstall.swf", flashvars, params, attributes);
</script>
	
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentTop" Runat="Server">

<div id="top" style="position:relative" class="systemHolder">
    <div class="systemFlashPanels" style="position:relative">
        <div class="items" style="">
            <div class="item active systemsSpecification">
                <a class="hotSpot" style="left:435px; top:125px; ">More Info</a>
                <div class="tooltip">
                    <h3><span>System One</span></h3>
                    <p>The quick brown fox.</p>
                </div>
                <a class="hotSpot" style="left:495px; top:190px; ">More Info</a>
                <div class="tooltip">
                    <h3><span>System Two</span></h3>
                    <p>Jumped over the lazy dog.</p>
                </div>
            </div>
            <div class="item systemsApplication" style="display:none">
                <a class="hotSpot" style="left:470px; top:235px; ">More Info</a>
                <div class="tooltip">
                    <h3><span>Application One</span></h3>
                    <p>The quick brown fox.</p>
                </div>
            </div>
            <div class="item systemsGroundStation" style="display:none">
                <a class="hotSpot" style="left:695px; top:70px; ">More Info</a>
                <div class="tooltip">
                    <h3><span>Ground Station</span></h3>
                    <p>Where are all the good times?</p>
                </div>
            </div>
        </div>
        
        <div id="flashContainer" style="">
            <div id="Systems">
                <h1>Systems</h1>
                <p>Alternative content</p>
                <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
	        </div>
        </div>
            
    </div>
    <%--<a class="prev browse left">---</a><a class="next browse right">|||</a>--%>

    <div id="subNav" style="" class="clearfix">
        <ul id="navApplications">
            <li class="active" ><a href="#" class="navApplication ">Specifications</a></li>
            <li ><a href="#" class="navApplication ">Payload</a></li>
            <li ><a href="#" class="navApplication ">Ground Stations</a></li>
        </ul>
        
        <ul id="navDetails">
            <li><a href="#" class="active">System</a></li>
            <li><a href="#" class="">Applications</a></li>
            <li><a href="#" class="">Video</a></li>
            <li><a href="#" class="">Support</a></li>
            <li><a href="#" class="">Brochure</a></li>
        </ul>
        
    </div>
    <div id="pageTitle" class="clearfix">
            <h1><acms:PostDisplayName ID="PostDisplayName" runat="server" /></h1>
            <a href="#" id="moreInfo" class="off">More Info</a>
        </div>
</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentBase" Runat="Server">

<!--<form name="form1" onsubmit="return false;">-->
	<input type="text" name="input" value="" />
    <%--<input type="button" value="Send" onclick="sendToActionScript(this.form.input.value);" /><br />--%>
    <textarea cols="60" rows="20" name="output" readonly="true">Initializing...</textarea>
<!--</form>-->
<a href="#" id="Test">aaaaa</a>
<div id="TestBlock" style="width:100px; height:400px; background:red"></div>
</asp:Content>

